from django.db import models
from .__baseModel import BaseModel
from .userModel import User
from .contentModel import Content

class Read(BaseModel):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    content = models.ForeignKey(Content, on_delete=models.CASCADE)
    read_at = models.DateTimeField(auto_now=True, db_comment='最近阅读时间')
    read_num = models.IntegerField(default=0, db_comment='阅读次数')